<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<script type="text/javascript">
	$(document).ready(function(){
		$(".action[name=content_submit]").click(function(){
		if($(":input[name=name]").val()==""){
			alert("이름을 입력하세요");
			return;
		}
		if($(":input[name=uploadFile]").val()==""){
			alert("감독 이미지를 등록하세요");
			return;
		}
		$("form[name=write_form]").submit();
	});
	$(".action[name=cancel]").click(function(){
		$("form[name=write_form]")[0].reset();
	});
});
</script>
<h3>감독 - 등록</h3>
<hr align="left" width="150">
<center>
<form action="${initParam.root }admin/director_write.do" enctype="multipart/form-data" method="post" name="write_form">
	<table class="inputForm">
		<tbody>
			<tr>
				<td>이미지</td>
				<td><input type="file" name="uploadFile"></td>
			</tr>
			<tr>
				<td>감독이름</td>
				<td colspan="3"><input type="text" name="name" size="20"></td>
			</tr>
			<tr>
				<td colspan="4" align="center">
					<img class="action" src="${initParam.root}img/write_btn.jpg" alt="글입력" name="content_submit">
					<img class="action" src="${initParam.root}img/cancel.gif" name="cancel">
				</td>
			</tr>
		</tbody>
	</table>
</form>
</center>